<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>登录 - 飞行评估可视化工具</title>
    <link rel="stylesheet" href="/static/css/main.css">
    <style>
        body {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100vh;
            margin: 0;
            background-color: var(--background);
        }
        .login-box {
            background: white;
            padding: 2.4rem;
            border-radius: 10px;
            box-shadow: var(--shadow);
            width: 360px;
        }
        .login-box h2 {
            text-align: center;
            margin-bottom: 1.5rem;
        }
        .form-group {
            margin-bottom: 1rem;
        }
        label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
        }
        input[type="text"],
        input[type="password"] {
            width: 100%;
            padding: 0.5rem;
            border: 1px solid var(--border);
            border-radius: 6px;
        }
        .btn-login {
            width: 100%;
            padding: 0.9rem;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            transition: background 0.3s;
        }
        .btn-login:hover {
            background: #357ABD;
        }
        .error {
            color: red;
            font-size: 0.9em;
            margin-top: 0.5rem;
        }
    </style>
</head>
<body>
<div class="login-box">
    <h2>登录</h2>
    <form method="POST">
        <div class="form-group">
            <label for="username">用户名</label>
            <input type="text" id="username" name="username" required>
        </div>
        <div class="form-group">
            <label for="password">密码</label>
            <input type="password" id="password" name="password" required>
        </div>
        {% if error %}
        <div class="error">{{ error }}</div>
        {% endif %}
        <button type="submit" class="btn-login">登录</button>
    </form>
</div>
</body>
</html>
